<?xml version="1.0" encoding="utf-8"?>
 <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rddl="http://www.rddl.org/" xmlns:xhtml="http://www.w3.org/1999/xhtml">
   <start>
     <element name="library">
       <oneOrMore>
         <ref name="book-element"/>
       </oneOrMore>
     </element>
   </start>
   <define name="author-element">
     <element name="author">
       <xhtml:div>
         <rddl:resource id="author-transform" xlink:arcrole="http://www.w3.org/1999/xhtml" xlink:role="http://www.w3.org/1999/XSL/Transform" xlink:title="Author XSLT template" xlink:href="library.xslt#author">
           <xhtml:div class="resource">
             <xhtml:h4>XSLT Transformation</xhtml:h4>
             <xhtml:p>This <xhtml:a href="library.xslt#author">XSLT template</xhtml:a> displays the description of an author as XHTML.</xhtml:p>
           </xhtml:div>
         </rddl:resource>
         <rddl:resource id="CSS" xlink:title="CSS Stylesheet" xlink:role="http://www.isi.edu/in-notes/iana/assignments/media-types/text/css" xlink:href="author.css">
           <xhtml:div class="resource">
             <xhtml:h4>CSS Stylesheet</xhtml:h4>
             <xhtml:p>A <xhtml:a href="author.css">CSS stylesheet</xhtml:a> defining some cool styles to display an author.</xhtml:p>
           </xhtml:div>
         </rddl:resource>
       </xhtml:div>
       <attribute name="id"/>
       <ref name="name-element"/>
       <ref name="born-element"/>
       <optional>
         <ref name="dead-element"/>
       </optional>
     </element>
   </define>
   <define name="book-start">
     <attribute name="id"/>
     <ref name="isbn-element"/>
     <ref name="title-element"/>
     <zeroOrMore>
       <ref name="author-element"/>
     </zeroOrMore>
   </define>
   <define name="book-end">
     <zeroOrMore>
       <ref name="author-element"/>
     </zeroOrMore>
     <zeroOrMore>
       <ref name="character-element"/>
     </zeroOrMore>
     <attribute name="available"/>
   </define>
   <define name="book-element">
     <element name="book">
       <ref name="book-start"/>
       <ref name="book-end"/>
     </element>
   </define>
   <define name="born-element">
     <element name="born">
       <text/>
     </element>
   </define>
   <define name="character-element">
     <element name="character">
       <attribute name="id"/>
       <ref name="name-element"/>
       <ref name="born-element"/>
       <ref name="qualification-element"/>
     </element>
   </define>
   <define name="dead-element">
     <element name="dead">
       <text/>
     </element>
   </define>
   <define name="isbn-element">
     <element name="isbn">
       <text/>
     </element>
   </define>
   <define name="name-element">
     <element name="name">
       <text/>
     </element>
   </define>
   <define name="qualification-element">
     <element name="qualification">
       <text/>
     </element>
   </define>
   <define name="title-element">
     <element name="title">
       <attribute name="xml:lang"/>
       <text/>
     </element>
   </define>
 </grammar>
